<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<script type="text/javascript">
		function focusObj(id) {
			id.style.backgroundColor = "#FFCC80";
		}

		function blurUser(id) {
			var user = id.value
			if (user == "") {
				userDiv.innerHTML = "账号不能为空！"
				return false
			}
			for (var i = 0; i < user.length; i++) {
				var j = user.substring(i, i + 1)
				if (j == " ") {
					userDiv.innerHTML = "账号中不能包含空格！"
					return false
				}
			}
			id.style.backgroundColor = "#FFF"
			userDiv.innerHTML = ""
			return true
		}

		function blurPwd(id) {
			var pwd = id.value
			var pwdDiv = document.getElementById("pwdDiv")
			if (pwd.length < 6) {
				pwdDiv.innerHTML = "密码长度必须达到6个字符！"
				return false
			}
			id.style.backgroundColor = "#FFF"
			pwdDiv.innerHTML = ""
			return true;
		}

		function checkAvailable() {
			var user = document.getElementById("User").value;
			if (user == "") {
				alert("请输入账号！")
				return false;
			}
			var pwd = document.getElementById("Pwd").value;
			if (pwd == "") {
				alert("请输入密码！")
				return false;
			}
			if (pwd.length < 6) {
				return false;
			}
			var radioJob = document.getElementsByName("txtJob");
			var isRadioJobChecked = false;
			for (var i = 0; i < radioJob.length; i++) {
				if (radioJob[i].checked) {
					isRadioJobChecked = true;
					break;
				}
			}
			if (!isRadioJobChecked) {
				alert("请选择工作性质！")
				return false;
			}
			return true;
		}
	</script>
	<link rel="stylesheet" href="css/new.css" />

	<body style="background-image:url(bg3.jpg); background-size: cover; -moz-background-size: cover;">
		<div style="width: 90%;">
			<form action="" method="get">
				<div class="DIV">
					<table>
						<tbody>
							<div>
								<div id="container">
									<div id="header"><img src="bg.png" style="width:300px;height: 60px;"></div>

									<table border="0px" width="100%">
										<tr>
											<td width="50%">
												<p>账号：<input type="text" id="User" name="User" onfocus="focusObj(this)" onblur="blurUser(this)" /></p>
											</td>
											<td>
												<p>
													<font color="red">*</font><div id="userDiv"></div>
												</p>
											</td>
										</tr>
										<tr>
											<td>
												<p>密码：<input type="password" id="Pwd" name="Pwd" onfocus="focusObj(this)" onblur="blurPwd(this)"></p>
											</td>
											<td>
												<p>
													<font color="red">*</font><div id="pwdDiv"></div>
												</p>
											</td>
										</tr>
									</table>
									<p><input type="radio" name="txtJob" id="txtJob" value="系统管理员" />系统管理员
										<input type="radio" name="txtJob" id="txtJob" value="普通员工" />普通员工</p>
                                    <table>
                                    	<tr>
									<td><p>验证码：<input type="text" name="yanzheng" id="yanzheng" /></p></td>
									<td><img src="yanzheng.png" style="width: 90px; height: 25px;"></td>
									</tr>
                                    </table>
                                    <p></p>
									<div class="Div">
<<<<<<< HEAD
										<input type="submit" id="btnSubMit" name="btnSubMit" value="登陆"  onclick="return checkAvailable()";"window.open( 'index.htm ', 'blank_ ', 'scrollbars=yes,resizable=yes '):"/>
=======
										<input type="submit" id="btnSubMit" name="btnSubMit" value="登陆" onclick="return checkAvailable();"/></a>
>>>>>>> refs/remotes/origin/master
									</div>
									<div class="Div">
										<input type="reset" id="btnReset" name="btnReset" value="取消" />
									</div>
									<div id="footer"></div>
									<div id="footer">&copy;第五小组</div>
								</div>
							</div>
						</tbody>
					</table>
				</div>
			</form>
		</div>
	</body>

</html>
